package com.sunwayhorizo.health.business.patad.encounter;

import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import javax.ejb.*;
import javax.validation.*;
import com.sunwayhorizo.health.business.dto.*;
import com.sunwayhorizo.health.business.dto.patad.encounter.*;
import com.sunwayhorizo.health.hl7.rim.*;

@Local
public interface AdmitManagerLocal
{

    /**
     * 转科
     * 
     * @Title: newAdmit
     * @param @param patientEncounterDTO 患�?挂号DTO与前台VO对应
     * @return ResultsDTO 保存成功返回患�?ID
     * @throws Hl7Exception
     *             ,ValidateException
     * @firstAuthor obama
     * @firstTime 2011-03-24 10:42:15
     * @lastAuthor obama
     * @lastTime 2011-03-24 10:50:04
     */
    ResultsDTO newDeptTransfer(PatientEncounterDTO patientEncounterDTO) throws Hl7Exception;


    /**
     * 根据患�?id查询患�?全部信息
     * 
     * @param natureId
     *            患�?id
     * @return ResultsDTO
     * @throws Hl7Exception
     */
    public ResultsDTO findPatientEncounterDTOByNatureId(String natureId) throws Hl7Exception;


    /**
     * 构�?患�?就诊列表信息
     * 
     * @param list
     *            RimCoreActPrtcptns集合
     * @return
     * @throws Hl7Exception
     *             ,ValidateException
     */

    /**
     * 根据患�?id查询就诊信息
     * 
     * @param id
     *            患�?id
     * @return
     * @throws Hl7Exception
     *             ,ValidateException
     */

    PatientEncounterDTO findPatientEncounterDTOByPatientNatureId(String natureId) throws Hl7Exception, ValidationException;


    /**
     * 根据入院、转科动作封装PatientEncounterDTO
     * 
     * @param 入院
     *            、转科动�?
     * @author Obama
     * @return PatientEncounterDTO
     * @throws Hl7Exception
     * 
     */
    PatientEncounterDTO convertPatientEncounterDTO(PatientEncounter encounter) throws Hl7Exception;


    /**
     * 入院
     * 
     * @Title: newInHospital
     * @param patientEncounterDTO
     *            入院信息
     * @return ResultsDTO 保存成功返回患者信息
     * @throws Hl7Exception
     *             ,ValidateException
     * @firstAuthor obama
     * @firstTime 2011-03-25 10:42:15
     * @lastAuthor obama
     * @lastTime 2011-03-25 10:50:04
     */
    ResultsDTO newInHospital(PatientEncounterDTO patientEncounterDTO) throws Hl7Exception;


    PatientEncounterDTO convertPatientEncounterDTO(PatientEncounterDTO patientEncounterDTO, PatientEncounter encounter) throws Hl7Exception;


    ResultsDTO newOutHospital(PatientEncounterDTO patientEncounterDTO) throws Hl7Exception;


    PatientEncounterDTO convertTransfer(PatientEncounter transfer, PatientEncounterDTO patientEncounterDTO) throws Hl7Exception;


    ResultsDTO findAdmitList(String workgroupId, String encounterType, PageDTO pageDTO) throws Hl7Exception;

    PatientEncounterDTO convertOutPatientEncounterDTOFromPatientEncounter(PatientEncounter pe,PatientEncounterDTO patientEncounterDTO) throws Hl7Exception;
}
